import numpy as np
import matplotlib.pyplot as pl
from radiosim import pyradio
duration = 0.01
fs = 32000  

fig, axes = pl.subplots(3, 1, figsize=(12, 10), sharex=True)

for test_num in range(3):
    x_o, A1, fc1, phi1 = pyradio.rand_wave(duration=duration, fs=fs)
    print(f"A1 = {A1:.4f}, fc1 = {fc1:.2f}, phi1 = {phi1:.4f}, shape = {x_o.shape}")
    x_o = x_o.real
    
    t = np.arange(len(x_o)) / fs  
    
    ax = axes[test_num]
    ax.plot(t, x_o, linewidth=0.8)
    
axes[-1].set_xlabel('Time (s)')
pl.show()